package com.chen.pojo.entry;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author chen
 * @version 1.0
 * @create_date 2025/8/17
 * 商品实体类
 */
@Data
@TableName("tb_sku")
@Schema(description = "商品实体类")
public class Sku {
    @Schema(description = "商品ID")
    @TableId("sku_id")
    private String skuId;

    @Schema(description = "商品名称")
    private String skuName;

    @Schema(description = "商品图片")
    private String skuImage;

    @Schema(description = "品牌名称")
    private String brandName;

    @Schema(description = "价格")
    private BigDecimal price;

    @Schema(description = "分类ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer classId;

    @Schema(description = "是否折扣")
    private Boolean discount;

    @Schema(description = "单位")
    private String unit;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
}